support git files as input to computations
authorJoey Hess <joeyh@joeyh.name>
Mon, 3 Mar 2025 15:59:04 +0000 (11:59 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 3 Mar 2025 16:09:25 +0000 (12:09 -0400)
commita0d6a6ea2a486081f2f3c561b0eb4757a17e9d96
treee16fb78f5d04af566640f733d8fd98e1b2a76a67
parent6ebab7fb00477ee473035bee9644b252f049e928
support git files as input to computations

Using GIT keys, like are used when exporting git files to special
remotes. Except here the GIT key refers to a file checked into the git
repo.

Note that, since the compute remote uses catObject to get the content,
a symlink that is checked into git does not get followed. This is important
for security, because following a symlink and adding the content to the
repo as an annex object would allow exfiltrating content from outside
the repository.

Instead, the behavior with a symlink is to run the computation on the
symlink target. This may turn out to be confusing, and it might be worth
addcomputed checking if the file in git is a symlink and erroring out.
Or it could follow symlinks as long as the destination is a file in the
repisitory.
Command/AddComputed.hs
Git/Types.hs
Remote/Compute.hs
TODO-compute
doc/git-annex-addcomputed.mdwn